// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

Vue.config.productionTip = false
//引入lib-flexible
import 'lib-flexible'
//引入mint-ui
import MintUI from 'mint-ui'
//全局配置
Vue.use(MintUI)
//引入mint-ui的样式
import 'mint-ui/lib/style.css'
//引全局css样式  要想更改mint-ui默认的样式，把自己写的css文件放其后面加载
//这里如果是引入less文件的话，必须要这样引入，否则会报错，原因我也不知道
import '!style-loader!css-loader!less-loader!../static/css/config.less'
//引入iconfont
import '../src/icon/iconfont.css'
//配置axios,先引入
import Axios from 'axios'
//给Vue配置全局的axios
Vue.prototype.$axios = Axios
//设置默认路径
Axios.defaults.baseURL = 'http://web.tl178.cn/'
Axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'
/* eslint-disable no-new */
//适配不同屏幕
window.onresize = setHtmlFontSize;
function setHtmlFontSize() {
	const htmlWidth = document.documentElement.clientWidth || document.body.clientWidth;
	const htmlDom = document.getElementsByTagName('html')[0];
	htmlDom.style.fontSize = htmlWidth / 10 + 'px';
};
setHtmlFontSize();
new Vue({
	el: '#app',
	router,
	components: {
		App
	},
	template: '<App/>'
})
